package whereRU.frontEnd;


/**
 * This class is used to represent a course from a students schedule
 */
public class Course {
	
	private long id;			// the id of the course in a database
	private String name;		// name of the course
	private String building;	// building the course is in
	private String roomNum;		// room number of the course
	private String days;		// the days (ex. "M W F")
	private SimpleTime startTime;	// the start time in minutes
	private SimpleTime endTime;		// the end time	in minutes
	private int alarmIsSet;			// whether alarm is set (0 or 1)
	private int alarmDelay;			// the alarm delay in minutes
	
	/**
	 * Constructor
	 * @param id id of the course
	 * @param name name of the course
	 * @param building the building
	 * @param roomNum the room number 
	 * @param days	the days the course takes place on
	 * @param startTime	the start time
	 * @param endTime the end time
	 * @param alarmIsSet whether the alarm is set
	 * @param alarmDelay the alarm delay in minutes
	 */
	public Course(long id, String name, String building, String roomNum,  
					String days, SimpleTime startTime, SimpleTime endTime, 
					int alarmIsSet, int alarmDelay) {
		this.id = id;
		this.name = name;
		this.building = building;
		this.roomNum = roomNum;
		this.days = days;
		this.startTime = startTime;
		this.endTime = endTime;
		this.alarmIsSet = alarmIsSet;
		this.alarmDelay = alarmDelay;
	}
	
	// accessor methods
	public long getId()			{ return id;	}
	public String getName() 		{ return name; }
	public String getBuilding() 	{ return building; }
	public String getRoomNum() 		{ return roomNum; }
	public String getDays()			{ return days;	}
	public SimpleTime getStartTime()	{ return startTime;	}
	public SimpleTime getEndTime()		{ return endTime;	}
	public int getAlarmIsSet()		{ return alarmIsSet;	}
	public int getAlarmDelay()		{ return alarmDelay;	}
	
	public String toString() {
		return 	name + "\n" + building + " " + roomNum + "\n" + days +
				"\n" + startTime.toString() + " - " + endTime.toString();		
	}
}
